using System.Collections.ObjectModel;

namespace Game.ExtensibleObjects
{
    public class RuntimeExtensionFactoryCollection : Collection<IRuntimeExtensionFactory>
    {
        public RuntimeExtensionCollection GetExtensionCollection(IRuntimeExtensibleObject source)
        {
            var c = new RuntimeExtensionCollection();

            foreach (var f in this)
            {
                c.Add(f.CreateExtension(source));
            }

            return c;
        }
    }
}